package com.google.coffeeshop.dao.impl;

import java.util.List;

import com.google.coffeeshop.dao.ReceiptNoteLineDAO;
import com.google.coffeeshop.entity.ReceiptNoteLineDTO;
import com.googlecode.genericdao.search.Search;


public class ReceiptNoteLineDAOImpl extends AbstractBaseDAOImpl<ReceiptNoteLineDTO, Long> implements ReceiptNoteLineDAO {

	@Override
	public List<ReceiptNoteLineDTO> findByReceiptNoteId(long receiptNoteId) {
		Search search = new Search(ReceiptNoteLineDTO.class);
		search.setFirstResult(0);
		search.setMaxResults(Integer.MAX_VALUE);
		search.addFilterEqual("receiptNote.id", receiptNoteId);
		return this.search(search);
	}

}
